#!/bin/sh

sudo apt install -y build-essential cmake

git clone git://git.openssl.org/openssl.git
#检出3.0.13版本
git -C openssl checkout 85cf92f
mkdir b0
cd b0
../openssl/Configure
make -j 8
sudo make install
cd ..

git clone https://github.com/sogou/workflow.git
cmake -Bb1 -DCMAKE_BUILD_TYPE:STRING=Release -DOPENSSL_CRYPTO_LIBRARY:FILEPATH=/usr/local/lib64/libcrypto.so -DOPENSSL_SSL_LIBRARY:FILEPATH=/usr/local/lib64/libssl.so -Dpkgcfg_lib__OPENSSL_crypto:FILEPATH=/usr/local/lib64/libcrypto.so -Dpkgcfg_lib__OPENSSL_ssl:FILEPATH=/usr/local/lib64/libssl.so workflow
sudo cmake --build b1 -j 8 -t install

cmake -Bb -DCMAKE_BUILD_TYPE:STRING=Release .
cmake --build b
